<!--
 * @Author: ykr
 * @Date: 2024-01-09 14:47:53
 * @LastEditors: ykr
 * @LastEditTime: 2024-01-09 16:00:39
 * @FilePath: \zmglpt-ui-mobile-v1.1\dev\pages\supervision\yzyhDetail.vue
-->
<template>
  <view class="page">
    <!-- #ifdef H5-ONLY -->
		<theme-navbar :is-white="false" title="应知应会" :custom-back="goBack" style="z-index: 99999"></theme-navbar>
		<!-- #endif -->
		<view class="content">
      <view class="kl-title ta-c pd-8">
        {{ knowledgeInfo.knowledgeTitle }}
      </view>
      <view class="kl-date ta-c pd-8">
        {{ knowledgeInfo.releaseTime }}
      </view>
      <view class="pd-8">
        <div v-html="knowledgeInfo.releaseContent"></div>
      </view>
      <view class="pd-8">
        <view class="msg-title">
          附件:
        </view>
        <view class="msg-context">
          <attachment-upload :materialUuid="knowledgeUuid"></attachment-upload>
        </view>
      </view>
		</view>
  </view>
</template>

<script>
import MescrollMoreMixin from "@/components/mescroll-uni/mixins/mescroll-more.js";
import superviseService from '@/service/supervision/supervision.service.js';
import attachmentUpload from "./attachmentUpload"
export default {
  mixins: [ MescrollMoreMixin ],
	components:{
    attachmentUpload
  },
  data() {
    return {
			knowledgeInfo: {},
			knowledgeUuid: ''
    };
  },
  onLoad(opt){
		this.knowledgeUuid = opt.knowledgeUuid
		this.getMaterialDetail(this.knowledgeUuid)
  },
  methods: {
		getMaterialDetail (id) {
			this.$u.loading('正在加载...');
			superviseService.getKnowledgeInfo({id: id}).then(res => {
				this.$u.hideLoading();
				if (res.success) {
					this.knowledgeInfo = res.bean
				}
			}).catch(err => {
        this.$u.hideLoading();
        this.$u.toast(err);
      })
		}
  }
};
</script>

<style lang="scss" scoped>
	.content{
		padding: 0px 16px 5px 16px;
    margin: 5px 0px;
    background-color: #fff;
	}
	.msg-context{
		font-size: 16px;
    // padding: 11px 0px;
    word-break: break-all;
	}
  .ta-c{
    text-align: center;
  }
  .pd-8 {
    padding: 8px 0;
  }
  .kl-title {
    font-weight: 600;
    font-size: 16px;
    color: black;
  }
  .kl-date {
    opacity: .6;
  }
</style>